<script>
$(function(){
	$('#searchtype').val(INPUT_GET.searchtype);
    $('#keyword').val(INPUT_GET.keyword);
});
</script>
<div class="search">
    <form id='search'>
        <span>
            <select name="searchtype" id="searchtype" class="select1">
                <option>请选择查询类型</option>
                <option value="code">货号</option>
                <option value="product_name">商品名称（慢）</option>
                <option value="systemtype">系统类型</option>
            </select>
        </span>

        <span>
            <input type="text" name="keyword" id="keyword" value="" />
        </span>

        <span><input type="submit" value="搜索" /><?php echo showhide(array('app'=>APP,'mod'=>MOD)); ?></span>
    </form>
</div>
<div class="line_1"></div>
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="table1">
       <tr>
            <th class="th0" rel="product_id">编号</th>
            <th class="th1">商品民称</th>
            <th class="th0" rel="code">货号</th>
            <th class="th0" rel="num">库存</th>
            <th class="th1" rel="sold_num">已售出</th>
            <th class="th0" rel="price">单价</th>
            <th class="th1" rel="systemtype">系统类型</th>
            <th class="th1" rel="created_time">创建时间</th>
            <th class="th0">操作</a>
       </tr>
       <?php foreach($this->products as $product): ?> 
       <tr>
            <td><?php echo $product['product_id']; ?></td>
            <td><?php echo $product['name']; ?></td>
            <td><?php echo $product['code']; ?></td>
            <td><?php echo $product['num']; ?></td>
            <td><?php echo $product['sold_num']; ?></td>
            <td><?php echo $product['price']; ?></td>
            <td><?php echo $product['systemtype']; ?></td>
            <td><?php echo date('Y-m-d H:i:s',$product['created_time']); ?></td>
            <td><?php echo opt('edit','?app=order&mod=stock&product_id='.$product['product_id']); ?></td>
       </tr>
       <?php endforeach; ?>
</table>
<div class="page_num">
     <div class="fl">
        <span></span>
     </div>
     <div class="fr">
        <p class="cpager">
            <?php echo $this->pager; ?>
        </p>
     </div>
</div>